# 初始化文件
import datetime

from flask import Flask
from .views import blue

def create_app():
    app = Flask(__name__)
    app.register_blueprint(blueprint=blue)

    print(app.config)
    app.config['SECRET_KEY'] = 'abc123'
    # 设置过期时间
    app.config['PERMANENT_SESSION_LIFETIME'] = datetime.timedelta(days=10)
    return app